# from db_model import *
from sqlalchemy.orm import sessionmaker
from sqlalchemy import create_engine
from sqlalchemy import MetaData
from sqlalchemy import Table, Column, BigInteger, Boolean, Date, DateTime, Enum, Float, Integer, Interval, LargeBinary, Numeric, Unicode, Text, Time, String
import tushare as ts
import pandas as pd

engine = create_engine('mysql://snrmyi:oditsz@localhost/stocks?charset=utf8&use_unicode=1')
metadata = MetaData()
trade_cal = Table('trade_cal', metadata,
                  Column('cal_date', Date(), primary_key=True),
                  Column('exchange', String(10), nullable=True),
                  Column('is_open', Integer(), nullable=True),
                  Column('pretrade_date', Date()))
